#ifndef __PLAYER_H__
#define __PLAYER_H__

#include "maajanTile.h"


class player {
	private:
		int id;
		int exp;
		int point;
		maajanHand hand;
		
	public:
		player(int i);
		
		void setExp(int newValue);
		void setPoint(int newValue);
		void setHand(const maajanHand &newValue);
		int getExp();
		int getPoint();

		void drawNewCard(const maajanTile &newValue);
		maajanTile *discardRequest(int index);

		action chiRequest(const maajanTile &currTile);
		action ponRequest(const maajanTile &currTile); // 0 - invalid; 1 - valid
		action kanRequest(const maajanTile &currTile); // 0 - invalid; 1 - valid
		action ronRequest(const maajanTile &currTile); // 0 - invalid; 1 - valid
		action tsumoRequest(const maajanTile &currTile); // 0 - invalid; 1 - valid
		
		void chi(	const int &index1,
					const int &index2,
					const maajanTile &newValue);
		
		void pon(	const int &index1,
					const int &index2,
					const maajanTile &newValue);
					
		void kan(	const int &index1,
					const int &index2,
					const int &index3,
					const maajanTile &currTile);
		
		int ron(const maajanTile &currTile);
		int tsumo(const maajanTile &currTile);
		
		void pass(); // pass control back to controllers
		
		void roundFinishReset();
		
	protected:
		void addToMeldlist(const maajanTile &tile1, const maajanTile &tile2));
		void addToMeldlist(const maajanTile &currTile;
		
};


#endif

